﻿using System;
using System.Windows.Forms;

namespace CAN_Controller
{
    public partial class DialogForm : Form
    {
        private string result;
        public string Result
        {
            get
            {
                return result;
            }

            set
            {
                result = value;
            }
        }

        public DialogForm()
        {
            InitializeComponent();
        }

        public DialogForm(String title_str, String label_str)
        {
            InitializeComponent();
            Text = title_str;
            label.Text = label_str;
        }

        private void ok_Btn_Click(object sender, EventArgs e)
        {
            result = textBox.Text;
            DialogResult = DialogResult.OK;
        }

        private void cancel_Btn_Click(object sender, EventArgs e)
        {
            DialogResult = DialogResult.Cancel;
        }
    }
}
